﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using cpmntctrl;

namespace Campus.Main.Basic.InsertValues
{
    public partial class Cource : StudentHandicap
    {
        public Cource()
        {
            InitializeComponent();
        }

        public Cource(List<string> item):base(item)
        {
            InitializeComponent();
            textBox1.Text = item[1];
            textBox2.Text = item[2];
        }
        protected override void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Length>0&&textBox2.Text.Length>0)
            {
                string desc = "'" + textBox1.Text.Trim(',', '-') + "'";
                aToDb.UpdateTable("cource", "description", "ball", desc, textBox2.Text.Trim(), id);
                Close();
            }
            else
            {
                ShowMessage.ShowWarningMessage(textBox1,textBox2);
            }
        }

        private void button1_Click_1(object sender, EventArgs e)
        {

        }
    }
}
